﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;

using SIPO.Library.DomainObject.Administration;
using SIPO.Library.DataAccess.Administration;
using SIPO.Library.DomainObject.Transaction;
using SIPO.Library.DataAccess.Transaction;
using SIPO.Library.DataAccess.Administration.Catalog;
using SIPO.Library.DomainObject.Administration.Catalog;
using SIPO.Library.DataAccess.Report;




public partial class reports_Transaction_rptRecInvoice1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            recDebtorRepo debtor = new recDebtorRepo(ConfigurationManager.ConnectionStrings["SIPOConn"].ConnectionString);

            List<recDebtor> ldebtor = debtor.GetList();

            ddlDebitur.Items.Clear();
            if (ldebtor.Count > 0)
            {
                ldebtor.ForEach(delegate(recDebtor ldebtors)
                    {
                        ddlDebitur.Items.Add(new ListItem(ldebtors.DebtorID + " - " + ldebtors.DebtorName, ldebtors.DebtorID.ToString()));
                    });
            }
            ddlDebitur.Items.Insert(0, new ListItem("-- Perusahaan --", string.Empty));
        }

    }
}